import { createBrowserRouter } from 'react-router-dom';

import NotFound from 'src/views/notFound';
import Login from '../views/login';
import Layout from '../layout';
import Index from '../views/index';

// 创建路由配置
const router = createBrowserRouter([
  {
    path: '/login',
    element: <Login />
  },
  {
    path: '/',
    element: <Layout />,
    children: [
      {
        index: true,
        element: <Index />
      }
    ]
  },
  {
    path: '*',
    element: <NotFound />
  }
]);

export default router;
